.class public Lcom/netease/newsreader/view/ImageViewTouch;
.super Landroid/widget/ImageView;
.source "ImageViewTouch.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/netease/newsreader/view/ImageViewTouch$Recycler;,
        Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;
    }
.end annotation


# static fields
.field protected static final BOTTOM_EDGE:I = 0x8

.field protected static final LEFT_EDGE:I = 0x1

.field protected static final NONE:I = 0x0

.field protected static final RIGHT_EDGE:I = 0x2

.field static final SCALE_RATE:F = 1.25f

.field private static final TAG:Ljava/lang/String; = "ImageViewTouchBase"

.field protected static final TOP_EDGE:I = 0x4


# instance fields
.field protected mBaseMatrix:Landroid/graphics/Matrix;

.field protected final mBitmapDisplayed:Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;

.field private final mDisplayMatrix:Landroid/graphics/Matrix;

.field private mImageViewer:Lcom/netease/newsreader/view/ImageViewer;

.field private final mMatrixValues:[F

.field mMaxZoom:F

.field private mOnLayoutRunnable:Ljava/lang/Runnable;

.field private mRecycler:Lcom/netease/newsreader/view/ImageViewTouch$Recycler;

.field protected mSuppMatrix:Landroid/graphics/Matrix;

.field mThisHeight:I

.field mThisWidth:I

.field private mTouchDelegate:Lcom/netease/newsreader/view/ImageViewTouchDelegate;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 3
    .parameter "context"

    .prologue
    const/4 v2, 0x0

    const/4 v1, -0x1

    .line 350
    invoke-direct {p0, p1}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V

    .line 50
    new-instance v0, Landroid/graphics/Matrix;

    invoke-direct {v0}, Landroid/graphics/Matrix;-><init>()V

    iput-object v0, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mBaseMatrix:Landroid/graphics/Matrix;

    .line 57
    new-instance v0, Landroid/graphics/Matrix;

    invoke-direct {v0}, Landroid/graphics/Matrix;-><init>()V

    iput-object v0, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mSuppMatrix:Landroid/graphics/Matrix;

    .line 61
    new-instance v0, Landroid/graphics/Matrix;

    invoke-direct {v0}, Landroid/graphics/Matrix;-><init>()V

    iput-object v0, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mDisplayMatrix:Landroid/graphics/Matrix;

    .line 64
    const/16 v0, 0x9

    new-array v0, v0, [F

    iput-object v0, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mMatrixValues:[F

    .line 67
    new-instance v0, Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;

    invoke-direct {v0, v2}, Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;-><init>(Landroid/graphics/Bitmap;)V

    iput-object v0, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mBitmapDisplayed:Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;

    .line 69
    iput v1, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mThisWidth:I

    iput v1, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mThisHeight:I

    .line 179
    iput-object v2, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mOnLayoutRunnable:Ljava/lang/Runnable;

    .line 351
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewTouch;->init()V

    .line 352
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 3
    .parameter "context"
    .parameter "attrs"

    .prologue
    const/4 v2, 0x0

    const/4 v1, -0x1

    .line 355
    invoke-direct {p0, p1, p2}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 50
    new-instance v0, Landroid/graphics/Matrix;

    invoke-direct {v0}, Landroid/graphics/Matrix;-><init>()V

    iput-object v0, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mBaseMatrix:Landroid/graphics/Matrix;

    .line 57
    new-instance v0, Landroid/graphics/Matrix;

    invoke-direct {v0}, Landroid/graphics/Matrix;-><init>()V

    iput-object v0, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mSuppMatrix:Landroid/graphics/Matrix;

    .line 61
    new-instance v0, Landroid/graphics/Matrix;

    invoke-direct {v0}, Landroid/graphics/Matrix;-><init>()V

    iput-object v0, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mDisplayMatrix:Landroid/graphics/Matrix;

    .line 64
    const/16 v0, 0x9

    new-array v0, v0, [F

    iput-object v0, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mMatrixValues:[F

    .line 67
    new-instance v0, Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;

    invoke-direct {v0, v2}, Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;-><init>(Landroid/graphics/Bitmap;)V

    iput-object v0, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mBitmapDisplayed:Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;

    .line 69
    iput v1, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mThisWidth:I

    iput v1, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mThisHeight:I

    .line 179
    iput-object v2, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mOnLayoutRunnable:Ljava/lang/Runnable;

    .line 356
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewTouch;->init()V

    .line 357
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
    .locals 3
    .parameter "context"
    .parameter "attrs"
    .parameter "defStyle"

    .prologue
    const/4 v2, 0x0

    const/4 v1, -0x1

    .line 360
    invoke-direct {p0, p1, p2, p3}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    .line 50
    new-instance v0, Landroid/graphics/Matrix;

    invoke-direct {v0}, Landroid/graphics/Matrix;-><init>()V

    iput-object v0, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mBaseMatrix:Landroid/graphics/Matrix;

    .line 57
    new-instance v0, Landroid/graphics/Matrix;

    invoke-direct {v0}, Landroid/graphics/Matrix;-><init>()V

    iput-object v0, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mSuppMatrix:Landroid/graphics/Matrix;

    .line 61
    new-instance v0, Landroid/graphics/Matrix;

    invoke-direct {v0}, Landroid/graphics/Matrix;-><init>()V

    iput-object v0, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mDisplayMatrix:Landroid/graphics/Matrix;

    .line 64
    const/16 v0, 0x9

    new-array v0, v0, [F

    iput-object v0, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mMatrixValues:[F

    .line 67
    new-instance v0, Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;

    invoke-direct {v0, v2}, Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;-><init>(Landroid/graphics/Bitmap;)V

    iput-object v0, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mBitmapDisplayed:Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;

    .line 69
    iput v1, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mThisWidth:I

    iput v1, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mThisHeight:I

    .line 179
    iput-object v2, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mOnLayoutRunnable:Ljava/lang/Runnable;

    .line 361
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewTouch;->init()V

    .line 362
    return-void
.end method

.method private init()V
    .locals 2

    .prologue
    .line 365
    sget-object v0, Landroid/widget/ImageView$ScaleType;->MATRIX:Landroid/widget/ImageView$ScaleType;

    invoke-virtual {p0, v0}, Lcom/netease/newsreader/view/ImageViewTouch;->setScaleType(Landroid/widget/ImageView$ScaleType;)V

    .line 366
    new-instance v0, Lcom/netease/newsreader/view/ImageViewTouchDelegate;

    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewTouch;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-direct {v0, v1}, Lcom/netease/newsreader/view/ImageViewTouchDelegate;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mTouchDelegate:Lcom/netease/newsreader/view/ImageViewTouchDelegate;

    .line 367
    return-void
.end method

.method private setImageBitmap(Landroid/graphics/Bitmap;I)V
    .locals 3
    .parameter "bitmap"
    .parameter "rotation"

    .prologue
    .line 160
    invoke-super {p0, p1}, Landroid/widget/ImageView;->setImageBitmap(Landroid/graphics/Bitmap;)V

    .line 161
    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewTouch;->getDrawable()Landroid/graphics/drawable/Drawable;

    move-result-object v0

    .line 162
    .local v0, d:Landroid/graphics/drawable/Drawable;
    if-eqz v0, :cond_0

    .line 163
    const/4 v2, 0x1

    invoke-virtual {v0, v2}, Landroid/graphics/drawable/Drawable;->setDither(Z)V

    .line 166
    :cond_0
    iget-object v2, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mBitmapDisplayed:Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;

    invoke-virtual {v2}, Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;->getBitmap()Landroid/graphics/Bitmap;

    move-result-object v1

    .line 167
    .local v1, old:Landroid/graphics/Bitmap;
    iget-object v2, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mBitmapDisplayed:Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;

    invoke-virtual {v2, p1}, Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;->setBitmap(Landroid/graphics/Bitmap;)V

    .line 168
    iget-object v2, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mBitmapDisplayed:Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;

    invoke-virtual {v2, p2}, Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;->setRotation(I)V

    .line 170
    if-eqz v1, :cond_1

    if-eq v1, p1, :cond_1

    iget-object v2, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mRecycler:Lcom/netease/newsreader/view/ImageViewTouch$Recycler;

    if-eqz v2, :cond_1

    .line 171
    iget-object v2, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mRecycler:Lcom/netease/newsreader/view/ImageViewTouch$Recycler;

    invoke-interface {v2, v1}, Lcom/netease/newsreader/view/ImageViewTouch$Recycler;->recycle(Landroid/graphics/Bitmap;)V

    .line 173
    :cond_1
    return-void
.end method


# virtual methods
.method protected center(ZZ)I
    .locals 12
    .parameter "horizontal"
    .parameter "vertical"

    .prologue
    const/high16 v11, 0x4000

    const/4 v10, 0x0

    .line 220
    iget-object v8, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mBitmapDisplayed:Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;

    invoke-virtual {v8}, Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;->getBitmap()Landroid/graphics/Bitmap;

    move-result-object v8

    if-nez v8, :cond_0

    .line 221
    const/16 v2, 0xf

    .line 262
    :goto_0
    return v2

    .line 224
    :cond_0
    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewTouch;->getMapRect()Landroid/graphics/RectF;

    move-result-object v4

    .line 226
    .local v4, rect:Landroid/graphics/RectF;
    invoke-virtual {v4}, Landroid/graphics/RectF;->height()F

    move-result v3

    .line 227
    .local v3, height:F
    invoke-virtual {v4}, Landroid/graphics/RectF;->width()F

    move-result v7

    .line 229
    .local v7, width:F
    const/4 v0, 0x0

    .local v0, deltaX:F
    const/4 v1, 0x0

    .line 231
    .local v1, deltaY:F
    const/4 v2, 0x0

    .line 232
    .local v2, edge:I
    if-eqz p2, :cond_1

    .line 233
    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewTouch;->getHeight()I

    move-result v5

    .line 234
    .local v5, viewHeight:I
    int-to-float v8, v5

    cmpg-float v8, v3, v8

    if-gez v8, :cond_3

    .line 235
    int-to-float v8, v5

    sub-float/2addr v8, v3

    div-float/2addr v8, v11

    iget v9, v4, Landroid/graphics/RectF;->top:F

    sub-float v1, v8, v9

    .line 236
    or-int/lit8 v2, v2, 0xc

    .line 246
    .end local v5           #viewHeight:I
    :cond_1
    :goto_1
    if-eqz p1, :cond_2

    .line 247
    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewTouch;->getWidth()I

    move-result v6

    .line 248
    .local v6, viewWidth:I
    int-to-float v8, v6

    cmpg-float v8, v7, v8

    if-gez v8, :cond_5

    .line 249
    int-to-float v8, v6

    sub-float/2addr v8, v7

    div-float/2addr v8, v11

    iget v9, v4, Landroid/graphics/RectF;->left:F

    sub-float v0, v8, v9

    .line 250
    or-int/lit8 v2, v2, 0x3

    .line 260
    .end local v6           #viewWidth:I
    :cond_2
    :goto_2
    invoke-virtual {p0, v0, v1}, Lcom/netease/newsreader/view/ImageViewTouch;->postTranslate(FF)V

    .line 261
    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewTouch;->getImageViewMatrix()Landroid/graphics/Matrix;

    move-result-object v8

    invoke-virtual {p0, v8}, Lcom/netease/newsreader/view/ImageViewTouch;->setImageMatrix(Landroid/graphics/Matrix;)V

    goto :goto_0

    .line 237
    .restart local v5       #viewHeight:I
    :cond_3
    iget v8, v4, Landroid/graphics/RectF;->top:F

    cmpl-float v8, v8, v10

    if-lez v8, :cond_4

    .line 238
    iget v8, v4, Landroid/graphics/RectF;->top:F

    neg-float v1, v8

    .line 239
    or-int/lit8 v2, v2, 0x4

    goto :goto_1

    .line 240
    :cond_4
    iget v8, v4, Landroid/graphics/RectF;->bottom:F

    int-to-float v9, v5

    cmpg-float v8, v8, v9

    if-gez v8, :cond_1

    .line 241
    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewTouch;->getHeight()I

    move-result v8

    int-to-float v8, v8

    iget v9, v4, Landroid/graphics/RectF;->bottom:F

    sub-float v1, v8, v9

    .line 242
    or-int/lit8 v2, v2, 0x8

    goto :goto_1

    .line 251
    .end local v5           #viewHeight:I
    .restart local v6       #viewWidth:I
    :cond_5
    iget v8, v4, Landroid/graphics/RectF;->left:F

    cmpl-float v8, v8, v10

    if-lez v8, :cond_6

    .line 252
    iget v8, v4, Landroid/graphics/RectF;->left:F

    neg-float v0, v8

    .line 253
    or-int/lit8 v2, v2, 0x1

    goto :goto_2

    .line 254
    :cond_6
    iget v8, v4, Landroid/graphics/RectF;->right:F

    int-to-float v9, v6

    cmpg-float v8, v8, v9

    if-gez v8, :cond_2

    .line 255
    int-to-float v8, v6

    iget v9, v4, Landroid/graphics/RectF;->right:F

    sub-float v0, v8, v9

    .line 256
    or-int/lit8 v2, v2, 0x2

    goto :goto_2
.end method

.method protected center(ZZF)V
    .locals 19
    .parameter "horizontal"
    .parameter "vertical"
    .parameter "durationMs"

    .prologue
    .line 276
    move-object/from16 v0, p0

    iget-object v1, v0, Lcom/netease/newsreader/view/ImageViewTouch;->mBitmapDisplayed:Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;

    invoke-virtual {v1}, Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;->getBitmap()Landroid/graphics/Bitmap;

    move-result-object v1

    if-nez v1, :cond_0

    .line 347
    :goto_0
    return-void

    .line 280
    :cond_0
    invoke-virtual/range {p0 .. p0}, Lcom/netease/newsreader/view/ImageViewTouch;->getImageViewMatrix()Landroid/graphics/Matrix;

    move-result-object v13

    .line 282
    .local v13, m:Landroid/graphics/Matrix;
    new-instance v14, Landroid/graphics/RectF;

    const/4 v1, 0x0

    const/4 v2, 0x0

    move-object/from16 v0, p0

    iget-object v3, v0, Lcom/netease/newsreader/view/ImageViewTouch;->mBitmapDisplayed:Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;

    invoke-virtual {v3}, Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;->getBitmap()Landroid/graphics/Bitmap;

    move-result-object v3

    invoke-virtual {v3}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v3

    int-to-float v3, v3

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/netease/newsreader/view/ImageViewTouch;->mBitmapDisplayed:Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;

    move-object/from16 v18, v0

    .line 283
    invoke-virtual/range {v18 .. v18}, Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;->getBitmap()Landroid/graphics/Bitmap;

    move-result-object v18

    invoke-virtual/range {v18 .. v18}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v18

    move/from16 v0, v18

    int-to-float v0, v0

    move/from16 v18, v0

    .line 282
    move/from16 v0, v18

    invoke-direct {v14, v1, v2, v3, v0}, Landroid/graphics/RectF;-><init>(FFFF)V

    .line 285
    .local v14, rect:Landroid/graphics/RectF;
    invoke-virtual {v13, v14}, Landroid/graphics/Matrix;->mapRect(Landroid/graphics/RectF;)Z

    .line 287
    invoke-virtual {v14}, Landroid/graphics/RectF;->height()F

    move-result v12

    .line 288
    .local v12, height:F
    invoke-virtual {v14}, Landroid/graphics/RectF;->width()F

    move-result v17

    .line 290
    .local v17, width:F
    const/4 v10, 0x0

    .local v10, deltaX:F
    const/4 v11, 0x0

    .line 292
    .local v11, deltaY:F
    new-instance v6, Landroid/graphics/PointF;

    invoke-direct {v6}, Landroid/graphics/PointF;-><init>()V

    .line 293
    .local v6, orig:Landroid/graphics/PointF;
    new-instance v8, Landroid/graphics/PointF;

    invoke-direct {v8}, Landroid/graphics/PointF;-><init>()V

    .line 294
    .local v8, old:Landroid/graphics/PointF;
    if-eqz p2, :cond_1

    .line 295
    invoke-virtual/range {p0 .. p0}, Lcom/netease/newsreader/view/ImageViewTouch;->getHeight()I

    move-result v15

    .line 296
    .local v15, viewHeight:I
    int-to-float v1, v15

    cmpg-float v1, v12, v1

    if-gez v1, :cond_3

    .line 297
    int-to-float v1, v15

    sub-float/2addr v1, v12

    const/high16 v2, 0x4000

    div-float/2addr v1, v2

    iget v2, v14, Landroid/graphics/RectF;->top:F

    sub-float v11, v1, v2

    .line 298
    iget v1, v14, Landroid/graphics/RectF;->top:F

    iput v1, v6, Landroid/graphics/PointF;->y:F

    .line 308
    .end local v15           #viewHeight:I
    :cond_1
    :goto_1
    if-eqz p1, :cond_2

    .line 309
    invoke-virtual/range {p0 .. p0}, Lcom/netease/newsreader/view/ImageViewTouch;->getWidth()I

    move-result v16

    .line 310
    .local v16, viewWidth:I
    move/from16 v0, v16

    int-to-float v1, v0

    cmpg-float v1, v17, v1

    if-gez v1, :cond_5

    .line 311
    move/from16 v0, v16

    int-to-float v1, v0

    sub-float v1, v1, v17

    const/high16 v2, 0x4000

    div-float/2addr v1, v2

    iget v2, v14, Landroid/graphics/RectF;->left:F

    sub-float v10, v1, v2

    .line 312
    iget v1, v14, Landroid/graphics/RectF;->left:F

    iput v1, v6, Landroid/graphics/PointF;->x:F

    .line 322
    .end local v16           #viewWidth:I
    :cond_2
    :goto_2
    invoke-virtual {v8, v6}, Landroid/graphics/PointF;->set(Landroid/graphics/PointF;)V

    .line 323
    div-float v7, v10, p3

    .line 324
    .local v7, incrementXPerMs:F
    div-float v9, v11, p3

    .line 326
    .local v9, incrementYPerMs:F
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v4

    .line 328
    .local v4, startTime:J
    new-instance v1, Lcom/netease/newsreader/view/ImageViewTouch$2;

    move-object/from16 v2, p0

    move/from16 v3, p3

    invoke-direct/range {v1 .. v9}, Lcom/netease/newsreader/view/ImageViewTouch$2;-><init>(Lcom/netease/newsreader/view/ImageViewTouch;FJLandroid/graphics/PointF;FLandroid/graphics/PointF;F)V

    move-object/from16 v0, p0

    invoke-virtual {v0, v1}, Lcom/netease/newsreader/view/ImageViewTouch;->post(Ljava/lang/Runnable;)Z

    goto/16 :goto_0

    .line 299
    .end local v4           #startTime:J
    .end local v7           #incrementXPerMs:F
    .end local v9           #incrementYPerMs:F
    .restart local v15       #viewHeight:I
    :cond_3
    iget v1, v14, Landroid/graphics/RectF;->top:F

    const/4 v2, 0x0

    cmpl-float v1, v1, v2

    if-lez v1, :cond_4

    .line 300
    iget v1, v14, Landroid/graphics/RectF;->top:F

    neg-float v11, v1

    .line 301
    iget v1, v14, Landroid/graphics/RectF;->top:F

    iput v1, v6, Landroid/graphics/PointF;->y:F

    goto :goto_1

    .line 302
    :cond_4
    iget v1, v14, Landroid/graphics/RectF;->bottom:F

    int-to-float v2, v15

    cmpg-float v1, v1, v2

    if-gez v1, :cond_1

    .line 303
    invoke-virtual/range {p0 .. p0}, Lcom/netease/newsreader/view/ImageViewTouch;->getHeight()I

    move-result v1

    int-to-float v1, v1

    iget v2, v14, Landroid/graphics/RectF;->bottom:F

    sub-float v11, v1, v2

    .line 304
    iget v1, v14, Landroid/graphics/RectF;->bottom:F

    iput v1, v6, Landroid/graphics/PointF;->y:F

    goto :goto_1

    .line 313
    .end local v15           #viewHeight:I
    .restart local v16       #viewWidth:I
    :cond_5
    iget v1, v14, Landroid/graphics/RectF;->left:F

    const/4 v2, 0x0

    cmpl-float v1, v1, v2

    if-lez v1, :cond_6

    .line 314
    iget v1, v14, Landroid/graphics/RectF;->left:F

    neg-float v10, v1

    .line 315
    iget v1, v14, Landroid/graphics/RectF;->left:F

    iput v1, v6, Landroid/graphics/PointF;->x:F

    goto :goto_2

    .line 316
    :cond_6
    iget v1, v14, Landroid/graphics/RectF;->right:F

    move/from16 v0, v16

    int-to-float v2, v0

    cmpg-float v1, v1, v2

    if-gez v1, :cond_2

    .line 317
    move/from16 v0, v16

    int-to-float v1, v0

    iget v2, v14, Landroid/graphics/RectF;->right:F

    sub-float v10, v1, v2

    .line 318
    iget v1, v14, Landroid/graphics/RectF;->right:F

    iput v1, v6, Landroid/graphics/PointF;->x:F

    goto :goto_2
.end method

.method public clear()V
    .locals 2

    .prologue
    .line 176
    const/4 v0, 0x0

    const/4 v1, 0x1

    invoke-virtual {p0, v0, v1}, Lcom/netease/newsreader/view/ImageViewTouch;->setImageBitmapResetBase(Landroid/graphics/Bitmap;Z)V

    .line 177
    return-void
.end method

.method public computeScroll()V
    .locals 1

    .prologue
    .line 127
    invoke-super {p0}, Landroid/widget/ImageView;->computeScroll()V

    .line 128
    iget-object v0, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mTouchDelegate:Lcom/netease/newsreader/view/ImageViewTouchDelegate;

    invoke-virtual {v0, p0}, Lcom/netease/newsreader/view/ImageViewTouchDelegate;->computeScroll(Lcom/netease/newsreader/view/ImageViewTouch;)V

    .line 129
    return-void
.end method

.method protected getImageViewMatrix()Landroid/graphics/Matrix;
    .locals 2

    .prologue
    .line 432
    iget-object v0, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mDisplayMatrix:Landroid/graphics/Matrix;

    iget-object v1, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mBaseMatrix:Landroid/graphics/Matrix;

    invoke-virtual {v0, v1}, Landroid/graphics/Matrix;->set(Landroid/graphics/Matrix;)V

    .line 433
    iget-object v0, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mDisplayMatrix:Landroid/graphics/Matrix;

    iget-object v1, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mSuppMatrix:Landroid/graphics/Matrix;

    invoke-virtual {v0, v1}, Landroid/graphics/Matrix;->postConcat(Landroid/graphics/Matrix;)Z

    .line 434
    iget-object v0, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mDisplayMatrix:Landroid/graphics/Matrix;

    return-object v0
.end method

.method public getImageViewer()Lcom/netease/newsreader/view/ImageViewer;
    .locals 1

    .prologue
    .line 116
    iget-object v0, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mImageViewer:Lcom/netease/newsreader/view/ImageViewer;

    return-object v0
.end method

.method protected getMapRect()Landroid/graphics/RectF;
    .locals 5

    .prologue
    const/4 v4, 0x0

    .line 266
    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewTouch;->getImageViewMatrix()Landroid/graphics/Matrix;

    move-result-object v0

    .line 268
    .local v0, m:Landroid/graphics/Matrix;
    new-instance v1, Landroid/graphics/RectF;

    iget-object v2, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mBitmapDisplayed:Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;

    invoke-virtual {v2}, Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;->getBitmap()Landroid/graphics/Bitmap;

    move-result-object v2

    invoke-virtual {v2}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v2

    int-to-float v2, v2

    iget-object v3, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mBitmapDisplayed:Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;

    .line 269
    invoke-virtual {v3}, Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;->getBitmap()Landroid/graphics/Bitmap;

    move-result-object v3

    invoke-virtual {v3}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v3

    int-to-float v3, v3

    .line 268
    invoke-direct {v1, v4, v4, v2, v3}, Landroid/graphics/RectF;-><init>(FFFF)V

    .line 271
    .local v1, rect:Landroid/graphics/RectF;
    invoke-virtual {v0, v1}, Landroid/graphics/Matrix;->mapRect(Landroid/graphics/RectF;)Z

    .line 272
    return-object v1
.end method

.method protected getMaxZoom()F
    .locals 1

    .prologue
    .line 562
    iget v0, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mMaxZoom:F

    return v0
.end method

.method protected getProperBaseMatrix(Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;Landroid/graphics/Matrix;)V
    .locals 9
    .parameter "bitmap"
    .parameter "matrix"

    .prologue
    const/high16 v8, 0x4000

    .line 402
    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewTouch;->getWidth()I

    move-result v7

    int-to-float v5, v7

    .line 403
    .local v5, viewWidth:F
    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewTouch;->getHeight()I

    move-result v7

    int-to-float v4, v7

    .line 405
    .local v4, viewHeight:F
    invoke-virtual {p1}, Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;->getWidth()I

    move-result v7

    int-to-float v6, v7

    .line 406
    .local v6, w:F
    invoke-virtual {p1}, Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;->getHeight()I

    move-result v7

    int-to-float v0, v7

    .line 407
    .local v0, h:F
    invoke-virtual {p2}, Landroid/graphics/Matrix;->reset()V

    .line 413
    div-float v1, v5, v6

    .line 416
    .local v1, scale:F
    invoke-virtual {p1}, Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;->getRotateMatrix()Landroid/graphics/Matrix;

    move-result-object v7

    invoke-virtual {p2, v7}, Landroid/graphics/Matrix;->postConcat(Landroid/graphics/Matrix;)Z

    .line 417
    invoke-virtual {p2, v1, v1}, Landroid/graphics/Matrix;->postScale(FF)Z

    .line 419
    mul-float v7, v6, v1

    sub-float v7, v5, v7

    div-float v2, v7, v8

    .line 420
    .local v2, transX:F
    mul-float v7, v0, v1

    sub-float v7, v4, v7

    div-float v3, v7, v8

    .line 421
    .local v3, transY:F
    const/4 v7, 0x0

    cmpg-float v7, v3, v7

    if-gez v7, :cond_0

    .line 422
    const/4 v3, 0x0

    .line 425
    :cond_0
    invoke-virtual {p2, v2, v3}, Landroid/graphics/Matrix;->postTranslate(FF)Z

    .line 426
    return-void
.end method

.method protected getScale()F
    .locals 1

    .prologue
    .line 380
    iget-object v0, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mSuppMatrix:Landroid/graphics/Matrix;

    invoke-virtual {p0, v0}, Lcom/netease/newsreader/view/ImageViewTouch;->getScale(Landroid/graphics/Matrix;)F

    move-result v0

    return v0
.end method

.method protected getScale(Landroid/graphics/Matrix;)F
    .locals 1
    .parameter "matrix"

    .prologue
    .line 376
    const/4 v0, 0x0

    invoke-virtual {p0, p1, v0}, Lcom/netease/newsreader/view/ImageViewTouch;->getValue(Landroid/graphics/Matrix;I)F

    move-result v0

    return v0
.end method

.method protected getTransX()F
    .locals 1

    .prologue
    .line 393
    iget-object v0, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mSuppMatrix:Landroid/graphics/Matrix;

    invoke-virtual {p0, v0}, Lcom/netease/newsreader/view/ImageViewTouch;->getTransX(Landroid/graphics/Matrix;)F

    move-result v0

    return v0
.end method

.method protected getTransX(Landroid/graphics/Matrix;)F
    .locals 1
    .parameter "matrix"

    .prologue
    .line 385
    const/4 v0, 0x2

    invoke-virtual {p0, p1, v0}, Lcom/netease/newsreader/view/ImageViewTouch;->getValue(Landroid/graphics/Matrix;I)F

    move-result v0

    return v0
.end method

.method protected getTransY()F
    .locals 1

    .prologue
    .line 397
    iget-object v0, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mSuppMatrix:Landroid/graphics/Matrix;

    invoke-virtual {p0, v0}, Lcom/netease/newsreader/view/ImageViewTouch;->getTransY(Landroid/graphics/Matrix;)F

    move-result v0

    return v0
.end method

.method protected getTransY(Landroid/graphics/Matrix;)F
    .locals 1
    .parameter "matrix"

    .prologue
    .line 389
    const/4 v0, 0x5

    invoke-virtual {p0, p1, v0}, Lcom/netease/newsreader/view/ImageViewTouch;->getValue(Landroid/graphics/Matrix;I)F

    move-result v0

    return v0
.end method

.method protected getValue(Landroid/graphics/Matrix;I)F
    .locals 1
    .parameter "matrix"
    .parameter "whichValue"

    .prologue
    .line 370
    iget-object v0, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mMatrixValues:[F

    invoke-virtual {p1, v0}, Landroid/graphics/Matrix;->getValues([F)V

    .line 371
    iget-object v0, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mMatrixValues:[F

    aget v0, v0, p2

    return v0
.end method

.method protected isReady()Z
    .locals 1

    .prologue
    .line 566
    iget-object v0, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mBitmapDisplayed:Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;

    invoke-virtual {v0}, Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;->getBitmap()Landroid/graphics/Bitmap;

    move-result-object v0

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method protected maxZoom()F
    .locals 5

    .prologue
    .line 444
    iget-object v3, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mBitmapDisplayed:Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;

    invoke-virtual {v3}, Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;->getBitmap()Landroid/graphics/Bitmap;

    move-result-object v3

    if-nez v3, :cond_0

    .line 445
    const/high16 v2, 0x3f80

    .line 451
    :goto_0
    return v2

    .line 448
    :cond_0
    iget-object v3, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mBitmapDisplayed:Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;

    invoke-virtual {v3}, Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;->getWidth()I

    move-result v3

    int-to-float v3, v3

    iget v4, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mThisWidth:I

    int-to-float v4, v4

    div-float v1, v3, v4

    .line 449
    .local v1, fw:F
    iget-object v3, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mBitmapDisplayed:Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;

    invoke-virtual {v3}, Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;->getHeight()I

    move-result v3

    int-to-float v3, v3

    iget v4, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mThisHeight:I

    int-to-float v4, v4

    div-float v0, v3, v4

    .line 450
    .local v0, fh:F
    invoke-static {v1, v0}, Ljava/lang/Math;->max(FF)F

    move-result v3

    const/high16 v4, 0x4080

    mul-float v2, v3, v4

    .line 451
    .local v2, max:F
    goto :goto_0
.end method

.method protected onLayout(ZIIII)V
    .locals 3
    .parameter "changed"
    .parameter "left"
    .parameter "top"
    .parameter "right"
    .parameter "bottom"

    .prologue
    .line 91
    invoke-super/range {p0 .. p5}, Landroid/widget/ImageView;->onLayout(ZIIII)V

    .line 92
    sub-int v1, p4, p2

    iput v1, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mThisWidth:I

    .line 93
    sub-int v1, p5, p3

    iput v1, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mThisHeight:I

    .line 94
    iget-object v0, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mOnLayoutRunnable:Ljava/lang/Runnable;

    .line 95
    .local v0, r:Ljava/lang/Runnable;
    if-eqz v0, :cond_0

    .line 96
    const/4 v1, 0x0

    iput-object v1, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mOnLayoutRunnable:Ljava/lang/Runnable;

    .line 97
    invoke-interface {v0}, Ljava/lang/Runnable;->run()V

    .line 99
    :cond_0
    iget-object v1, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mBitmapDisplayed:Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;

    invoke-virtual {v1}, Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;->getBitmap()Landroid/graphics/Bitmap;

    move-result-object v1

    if-eqz v1, :cond_1

    .line 100
    iget-object v1, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mBitmapDisplayed:Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;

    iget-object v2, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mBaseMatrix:Landroid/graphics/Matrix;

    invoke-virtual {p0, v1, v2}, Lcom/netease/newsreader/view/ImageViewTouch;->getProperBaseMatrix(Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;Landroid/graphics/Matrix;)V

    .line 101
    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewTouch;->getImageViewMatrix()Landroid/graphics/Matrix;

    move-result-object v1

    invoke-virtual {p0, v1}, Lcom/netease/newsreader/view/ImageViewTouch;->setImageMatrix(Landroid/graphics/Matrix;)V

    .line 103
    :cond_1
    return-void
.end method

.method public onTouchEvent(Landroid/view/MotionEvent;)Z
    .locals 1
    .parameter "event"

    .prologue
    .line 121
    iget-object v0, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mTouchDelegate:Lcom/netease/newsreader/view/ImageViewTouchDelegate;

    invoke-virtual {v0, p0, p1}, Lcom/netease/newsreader/view/ImageViewTouchDelegate;->onTouch(Lcom/netease/newsreader/view/ImageViewTouch;Landroid/view/MotionEvent;)Z

    move-result v0

    return v0
.end method

.method protected panBy(FF)V
    .locals 1
    .parameter "dx"
    .parameter "dy"

    .prologue
    .line 552
    invoke-virtual {p0, p1, p2}, Lcom/netease/newsreader/view/ImageViewTouch;->postTranslate(FF)V

    .line 553
    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewTouch;->getImageViewMatrix()Landroid/graphics/Matrix;

    move-result-object v0

    invoke-virtual {p0, v0}, Lcom/netease/newsreader/view/ImageViewTouch;->setImageMatrix(Landroid/graphics/Matrix;)V

    .line 554
    return-void
.end method

.method protected postTranslate(FF)V
    .locals 1
    .parameter "dx"
    .parameter "dy"

    .prologue
    .line 548
    iget-object v0, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mSuppMatrix:Landroid/graphics/Matrix;

    invoke-virtual {v0, p1, p2}, Landroid/graphics/Matrix;->postTranslate(FF)Z

    .line 549
    return-void
.end method

.method protected postTranslateCenter(FF)I
    .locals 1
    .parameter "dx"
    .parameter "dy"

    .prologue
    const/4 v0, 0x1

    .line 557
    invoke-virtual {p0, p1, p2}, Lcom/netease/newsreader/view/ImageViewTouch;->postTranslate(FF)V

    .line 558
    invoke-virtual {p0, v0, v0}, Lcom/netease/newsreader/view/ImageViewTouch;->center(ZZ)I

    move-result v0

    return v0
.end method

.method public setImageBitmap(Landroid/graphics/Bitmap;)V
    .locals 1
    .parameter "bitmap"

    .prologue
    .line 156
    const/4 v0, 0x0

    invoke-direct {p0, p1, v0}, Lcom/netease/newsreader/view/ImageViewTouch;->setImageBitmap(Landroid/graphics/Bitmap;I)V

    .line 157
    return-void
.end method

.method public setImageBitmapResetBase(Landroid/graphics/Bitmap;Z)V
    .locals 1
    .parameter "bitmap"
    .parameter "resetSupp"

    .prologue
    .line 184
    new-instance v0, Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;

    invoke-direct {v0, p1}, Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;-><init>(Landroid/graphics/Bitmap;)V

    invoke-virtual {p0, v0, p2}, Lcom/netease/newsreader/view/ImageViewTouch;->setImageRotateBitmapResetBase(Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;Z)V

    .line 185
    return-void
.end method

.method public setImageRotateBitmapResetBase(Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;Z)V
    .locals 3
    .parameter "bitmap"
    .parameter "resetSupp"

    .prologue
    .line 188
    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewTouch;->getWidth()I

    move-result v0

    .line 190
    .local v0, viewWidth:I
    if-gtz v0, :cond_0

    .line 191
    new-instance v1, Lcom/netease/newsreader/view/ImageViewTouch$1;

    invoke-direct {v1, p0, p1, p2}, Lcom/netease/newsreader/view/ImageViewTouch$1;-><init>(Lcom/netease/newsreader/view/ImageViewTouch;Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;Z)V

    iput-object v1, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mOnLayoutRunnable:Ljava/lang/Runnable;

    .line 212
    :goto_0
    return-void

    .line 199
    :cond_0
    invoke-virtual {p1}, Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;->getBitmap()Landroid/graphics/Bitmap;

    move-result-object v1

    if-eqz v1, :cond_2

    .line 200
    iget-object v1, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mBaseMatrix:Landroid/graphics/Matrix;

    invoke-virtual {p0, p1, v1}, Lcom/netease/newsreader/view/ImageViewTouch;->getProperBaseMatrix(Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;Landroid/graphics/Matrix;)V

    .line 201
    invoke-virtual {p1}, Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;->getBitmap()Landroid/graphics/Bitmap;

    move-result-object v1

    invoke-virtual {p1}, Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;->getRotation()I

    move-result v2

    invoke-direct {p0, v1, v2}, Lcom/netease/newsreader/view/ImageViewTouch;->setImageBitmap(Landroid/graphics/Bitmap;I)V

    .line 207
    :goto_1
    if-eqz p2, :cond_1

    .line 208
    iget-object v1, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mSuppMatrix:Landroid/graphics/Matrix;

    invoke-virtual {v1}, Landroid/graphics/Matrix;->reset()V

    .line 210
    :cond_1
    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewTouch;->getImageViewMatrix()Landroid/graphics/Matrix;

    move-result-object v1

    invoke-virtual {p0, v1}, Lcom/netease/newsreader/view/ImageViewTouch;->setImageMatrix(Landroid/graphics/Matrix;)V

    .line 211
    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewTouch;->maxZoom()F

    move-result v1

    iput v1, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mMaxZoom:F

    goto :goto_0

    .line 203
    :cond_2
    iget-object v1, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mBaseMatrix:Landroid/graphics/Matrix;

    invoke-virtual {v1}, Landroid/graphics/Matrix;->reset()V

    .line 204
    const/4 v1, 0x0

    invoke-virtual {p0, v1}, Lcom/netease/newsreader/view/ImageViewTouch;->setImageBitmap(Landroid/graphics/Bitmap;)V

    goto :goto_1
.end method

.method public setImageViewer(Lcom/netease/newsreader/view/ImageViewer;)V
    .locals 0
    .parameter "imageViewer"

    .prologue
    .line 112
    iput-object p1, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mImageViewer:Lcom/netease/newsreader/view/ImageViewer;

    .line 113
    return-void
.end method

.method public setRecycler(Lcom/netease/newsreader/view/ImageViewTouch$Recycler;)V
    .locals 0
    .parameter "r"

    .prologue
    .line 82
    iput-object p1, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mRecycler:Lcom/netease/newsreader/view/ImageViewTouch$Recycler;

    .line 83
    return-void
.end method

.method protected zoomIn()V
    .locals 1

    .prologue
    .line 504
    const/high16 v0, 0x3fa0

    invoke-virtual {p0, v0}, Lcom/netease/newsreader/view/ImageViewTouch;->zoomIn(F)V

    .line 505
    return-void
.end method

.method protected zoomIn(F)V
    .locals 5
    .parameter "rate"

    .prologue
    const/high16 v4, 0x4000

    .line 512
    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewTouch;->getScale()F

    move-result v2

    iget v3, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mMaxZoom:F

    cmpl-float v2, v2, v3

    if-ltz v2, :cond_1

    .line 524
    :cond_0
    :goto_0
    return-void

    .line 515
    :cond_1
    iget-object v2, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mBitmapDisplayed:Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;

    invoke-virtual {v2}, Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;->getBitmap()Landroid/graphics/Bitmap;

    move-result-object v2

    if-eqz v2, :cond_0

    .line 519
    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewTouch;->getWidth()I

    move-result v2

    int-to-float v2, v2

    div-float v0, v2, v4

    .line 520
    .local v0, cx:F
    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewTouch;->getHeight()I

    move-result v2

    int-to-float v2, v2

    div-float v1, v2, v4

    .line 522
    .local v1, cy:F
    iget-object v2, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mSuppMatrix:Landroid/graphics/Matrix;

    invoke-virtual {v2, p1, p1, v0, v1}, Landroid/graphics/Matrix;->postScale(FFFF)Z

    .line 523
    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewTouch;->getImageViewMatrix()Landroid/graphics/Matrix;

    move-result-object v2

    invoke-virtual {p0, v2}, Lcom/netease/newsreader/view/ImageViewTouch;->setImageMatrix(Landroid/graphics/Matrix;)V

    goto :goto_0
.end method

.method protected zoomOut()V
    .locals 1

    .prologue
    .line 508
    const/high16 v0, 0x3fa0

    invoke-virtual {p0, v0}, Lcom/netease/newsreader/view/ImageViewTouch;->zoomOut(F)V

    .line 509
    return-void
.end method

.method protected zoomOut(F)V
    .locals 7
    .parameter "rate"

    .prologue
    const/4 v6, 0x1

    const/high16 v4, 0x4000

    const/high16 v5, 0x3f80

    .line 527
    iget-object v3, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mBitmapDisplayed:Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;

    invoke-virtual {v3}, Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;->getBitmap()Landroid/graphics/Bitmap;

    move-result-object v3

    if-nez v3, :cond_0

    .line 545
    :goto_0
    return-void

    .line 531
    :cond_0
    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewTouch;->getWidth()I

    move-result v3

    int-to-float v3, v3

    div-float v0, v3, v4

    .line 532
    .local v0, cx:F
    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewTouch;->getHeight()I

    move-result v3

    int-to-float v3, v3

    div-float v1, v3, v4

    .line 535
    .local v1, cy:F
    new-instance v2, Landroid/graphics/Matrix;

    iget-object v3, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mSuppMatrix:Landroid/graphics/Matrix;

    invoke-direct {v2, v3}, Landroid/graphics/Matrix;-><init>(Landroid/graphics/Matrix;)V

    .line 536
    .local v2, tmp:Landroid/graphics/Matrix;
    div-float v3, v5, p1

    div-float v4, v5, p1

    invoke-virtual {v2, v3, v4, v0, v1}, Landroid/graphics/Matrix;->postScale(FFFF)Z

    .line 538
    invoke-virtual {p0, v2}, Lcom/netease/newsreader/view/ImageViewTouch;->getScale(Landroid/graphics/Matrix;)F

    move-result v3

    cmpg-float v3, v3, v5

    if-gez v3, :cond_1

    .line 539
    iget-object v3, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mSuppMatrix:Landroid/graphics/Matrix;

    invoke-virtual {v3, v5, v5, v0, v1}, Landroid/graphics/Matrix;->setScale(FFFF)V

    .line 543
    :goto_1
    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewTouch;->getImageViewMatrix()Landroid/graphics/Matrix;

    move-result-object v3

    invoke-virtual {p0, v3}, Lcom/netease/newsreader/view/ImageViewTouch;->setImageMatrix(Landroid/graphics/Matrix;)V

    .line 544
    invoke-virtual {p0, v6, v6}, Lcom/netease/newsreader/view/ImageViewTouch;->center(ZZ)I

    goto :goto_0

    .line 541
    :cond_1
    iget-object v3, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mSuppMatrix:Landroid/graphics/Matrix;

    div-float v4, v5, p1

    div-float/2addr v5, p1

    invoke-virtual {v3, v4, v5, v0, v1}, Landroid/graphics/Matrix;->postScale(FFFF)Z

    goto :goto_1
.end method

.method protected zoomTo(F)V
    .locals 4
    .parameter "scale"

    .prologue
    const/high16 v3, 0x4000

    .line 489
    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewTouch;->getWidth()I

    move-result v2

    int-to-float v2, v2

    div-float v0, v2, v3

    .line 490
    .local v0, cx:F
    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewTouch;->getHeight()I

    move-result v2

    int-to-float v2, v2

    div-float v1, v2, v3

    .line 492
    .local v1, cy:F
    invoke-virtual {p0, p1, v0, v1}, Lcom/netease/newsreader/view/ImageViewTouch;->zoomTo(FFF)V

    .line 493
    return-void
.end method

.method protected zoomTo(FFF)V
    .locals 4
    .parameter "scale"
    .parameter "centerX"
    .parameter "centerY"

    .prologue
    const/4 v3, 0x1

    .line 460
    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewTouch;->getScale()F

    move-result v1

    .line 461
    .local v1, oldScale:F
    div-float v0, p1, v1

    .line 463
    .local v0, deltaScale:F
    iget-object v2, p0, Lcom/netease/newsreader/view/ImageViewTouch;->mSuppMatrix:Landroid/graphics/Matrix;

    invoke-virtual {v2, v0, v0, p2, p3}, Landroid/graphics/Matrix;->postScale(FFFF)Z

    .line 464
    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewTouch;->getImageViewMatrix()Landroid/graphics/Matrix;

    move-result-object v2

    invoke-virtual {p0, v2}, Lcom/netease/newsreader/view/ImageViewTouch;->setImageMatrix(Landroid/graphics/Matrix;)V

    .line 465
    invoke-virtual {p0, v3, v3}, Lcom/netease/newsreader/view/ImageViewTouch;->center(ZZ)I

    .line 466
    return-void
.end method

.method protected zoomTo(FFFF)V
    .locals 9
    .parameter "scale"
    .parameter "centerX"
    .parameter "centerY"
    .parameter "durationMs"

    .prologue
    .line 470
    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewTouch;->getScale()F

    move-result v0

    sub-float v0, p1, v0

    div-float v6, v0, p4

    .line 471
    .local v6, incrementPerMs:F
    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewTouch;->getScale()F

    move-result v5

    .line 472
    .local v5, oldScale:F
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v3

    .line 474
    .local v3, startTime:J
    new-instance v0, Lcom/netease/newsreader/view/ImageViewTouch$3;

    move-object v1, p0

    move v2, p4

    move v7, p2

    move v8, p3

    invoke-direct/range {v0 .. v8}, Lcom/netease/newsreader/view/ImageViewTouch$3;-><init>(Lcom/netease/newsreader/view/ImageViewTouch;FJFFFF)V

    invoke-virtual {p0, v0}, Lcom/netease/newsreader/view/ImageViewTouch;->post(Ljava/lang/Runnable;)Z

    .line 486
    return-void
.end method

.method protected zoomToPoint(FFF)V
    .locals 4
    .parameter "scale"
    .parameter "pointX"
    .parameter "pointY"

    .prologue
    const/high16 v3, 0x4000

    .line 496
    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewTouch;->getWidth()I

    move-result v2

    int-to-float v2, v2

    div-float v0, v2, v3

    .line 497
    .local v0, cx:F
    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewTouch;->getHeight()I

    move-result v2

    int-to-float v2, v2

    div-float v1, v2, v3

    .line 499
    .local v1, cy:F
    sub-float v2, v0, p2

    sub-float v3, v1, p3

    invoke-virtual {p0, v2, v3}, Lcom/netease/newsreader/view/ImageViewTouch;->panBy(FF)V

    .line 500
    invoke-virtual {p0, p1, v0, v1}, Lcom/netease/newsreader/view/ImageViewTouch;->zoomTo(FFF)V

    .line 501
    return-void
.end method
